package practice;

import java.util.Scanner;

public class ScoreLevel {
    public static void main(String[] args) {
        PrintScoreLevel();
    }
    public static void PrintScoreLevel() {
        Scanner sc = new Scanner(System.in);
        int score = sc.nextInt();
        char level = (score >= 90) ? 'A' : (score >= 60) ? 'B' : 'C';
        System.out.println(score + " " + level);
    }
}
